﻿using Domain;
using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.AppService.SSAppServoice
{
    public class SSAppService : ISSAppService
    {
        private readonly ISSRepository sSRepository;

        public SSAppService(ISSRepository sSRepository)
        {
            this.sSRepository = sSRepository;
        }
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="ss"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task<bool> AddSSAsync(SS ss)
        {
            return sSRepository.AddSSAsync(ss);
        }
        /// <summary>
        /// 查询全部
        /// </summary>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task<List<SS>> SelectSSAsync()
        {
            return sSRepository.SelectSSAsync();
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="ss"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task<bool> UpdateSSAsync(SS ss)
        {
           return sSRepository.UpdateSSAsync(ss);
        }
        /// <summary>
        /// 条件查询  加分页
        /// </summary>
       public SSFenYE FenYeSSAsync(string CheckStatus, int page, int pageSize)
        {
          return sSRepository.FenYeSSAsync(CheckStatus, page, pageSize);
        }

        public SSFenYE DateSSAsync(string StandardId, string gzc, DateTime startDate, DateTime endDate, int page, int pageSize, string ChangeStatus)
        {
            return sSRepository.DateSSAsync(StandardId, gzc, startDate, endDate,page,pageSize,ChangeStatus);
        }

        Task<bool> ISSAppService.UpdateSSDesignerAsync(SS ss)
        {
            return sSRepository.UpdateSSDesignerAsync(ss);
        }

		Task<string> ISSAppService.SelectById(int id)
		{
			return sSRepository.SelectById(id);
		}

		public Task<SS> SelectSalarySum(string id)
		{
            return sSRepository.SelectSalarySum(id);
		}
	}
}
